<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInsuranceBillsTable extends Migration
{
  /**
   * 保险订单
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::create('insurance_bill', function (Blueprint $table) {
      $table->increments('id');
      $table->unsignedSmallInteger('vehicle_id')->comment('车辆信息ID');
      $table->string('card_positive', 255)->comment('身份证正面');
      $table->string('card_opposite', 255)->comment('身份证反面');
      $table->string('drive_positive', 255)->comment('行驶证正面');
      $table->string('drive_opposite', 255)->comment('行驶证反面');
      $table->string('price', 30)->comment('保险费');
      $table->string('start_time', 30)->comment('保险开始时间');
      $table->string('end_time', 30)->comment('保险到期时间');
      $table->unsignedSmallInteger('insurance_company_id')->comment('保险公司');
      $table->text('msg')->nullable()->comment('备注信息');
      $table->timestamps();
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::dropIfExists('insurance_bill');
  }
}
